package com.springlearn.springsourcecode.chap9;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author wtcode
 * @Description
 * @date 2025/3/31 - 14:58
 */
@ComponentScan("com.springlearn.springsourcecode.chap9")
public class A09Application {
    private static final Logger log = LoggerFactory.getLogger(A09Application.class);
    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(A09Application.class);

        E e = context.getBean(E.class);

        log.debug("{}",e.getF1().getClass());
        log.debug("{}",e.getF1());
        log.debug("{}",e.getF1());
        log.debug("{}",e.getF1());

        log.debug("{}",e.getF2().getClass());
        log.debug("{}",e.getF2());
        log.debug("{}",e.getF2());
        log.debug("{}",e.getF2());

        log.debug("{}",e.getF3());
        log.debug("{}",e.getF3());

        log.debug("{}",e.getF4());
        log.debug("{}",e.getF4());

        context.close();
    }
}
